The invention relates to a method for adjusting the accuracy of a computer program manipulating at least one number with a decimal point, and in particular for improving the accuracy of such a program. It also relates to a computer program and a system implementing such a method.
The field of the invention is the field of the calculation accuracy of computer programs manipulating numbers with a decimal point.
By accuracy is meant the (absolute or relative) deviation, or value, between the “theoretical” result of a mathematical calculation obtained from the field of real numbers and the “actual” result of this same calculation when it is carried out by a machine which uses fixed-point or floating-point arithmetic.
The accuracy comprises, on the one hand, errors caused by the computational representation chosen by the author of the computer program for the numbers and, on the other hand, those introduced by the instructions manipulating these numbers. In every case it is difficult, or even impossible, for an author to measure and adjust the accuracy of a computer program manipulating numbers with a decimal point manually.
On the one hand, it is very difficult to measure the accuracy of a computer program when it will be executed by a machine, because the arithmetics used cause accuracy problems which cannot be anticipated easily by a human. A long task of manual analysis and tests is necessary to evaluate the accuracy of a calculation.
On the other hand, the improvement or optimization of the accuracy is in principle combinatorial. In fact, there is an exponential (or even infinite) number of possible ways of writing one and the same calculation (or, in other words, mathematically equivalent formulae, by associativity, distributivity, etc.). Each way of writing a formula can have a different degree of accuracy from the others.
Currently, there is no automated method that makes it possible to take into account the errors caused in a computer program manipulating a number with a decimal point and to adjust or optimize the accuracy of this computer program.